<template>
  <div class="app-container">
    <el-button
      type="success"
      icon="el-icon-plus"
      @click="dialogFormVisible = true"
      >添加模板</el-button
    >



    <!-- 添加模板 -->
  <el-dialog
    title="模板编辑"
    :visible.sync="dialogFormVisible"
    :close-on-click-modal="false"
  >
    <el-form>
      <el-form-item label="模板名称" label-width="100px">
        <el-input v-model="entity.name"></el-input>
      </el-form-item>
      <el-form-item label="关联品牌" label-width="100px">
          <el-select v-model="entity.brands" multiple placeholder="请选择品牌">
            <el-option
            v-for="item in brands"
            :key="item.id"
            :label="item.name"
            :value="item.id">
            </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="关联规格" label-width="100px">
          <el-select v-model="entity.spec" multiple placeholder="请选择规格">
            <el-option
            v-for="item in specs"
            :key="item.id"
            :label="item.specName"
            :value="item.id">
            </el-option>
        </el-select>
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="dialogFormVisible = false">取 消</el-button>
      <el-button type="primary" @click="saveTmp()">确 定</el-button>
    </div>
  </el-dialog>
  </div>

  
</template>


<script>

export default {
  data() {
    return {
      dialogFormVisible: false,
      entity: {
       
      },
      brands:[], //品牌列表
      specs:[]//规格列表
    };
  },
  methods: {
    
  },

  created(){

  }
};
</script>